How to perform Caesar Cipher Encryption and Decryption

The Wikipedia have given the simplest explanation and example of the encryption algorithm called Caesar which is also known as the shift Cipher. However, I felt the method for encrypting and decrypting is a bit ambiguous for a non-cryptography student.


Caesar Cipher typically is a substitution cipher in which letter in an alphabet or plaintext or texts is replaced by another letter of some fixed position.


Rule of Thumb

In Caesar algorithm, counting of alphabets start from 0 to 25 and so letter A will be 0 and Z will be 25


Encryption in Caesar:

This is done by shifting all letters in the plaintext to 3 places which is equal to +3. In short, encryption is done by counting forwardly. For example



To encrypt the texts Hello using Caesar cipher, our output is going to be equal to

Hello = KHOOR = 10 7 14 14 17 and remember ciphertext is written in capital letters.


Decryption in Caesar:

This is done by shifting all letters in the ciphertext to 3 places again which is equal to -3. In short, decryption is done by counting backwardly. For example,

To decrypt the ciphertext KHOOR using Caesar, our output is going to be equal to

KHOOR = hello = 7 4 11 11 14


The above is the standard convention and method of Caesar

But at times, encryption can be done by left (backwardly) or right (forwardly) and vice versa.